<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\validate;

/**
 * 共享单车验证器
 */
class Bicycle extends AdminBase
{
    
    // 验证规则
    protected $rule =   [
        
        'bid'              => 'require|unique:bicycle',
        'place'               => 'require',
        'money'               => 'require|number',
    ];

    // 验证提示
    protected $message  =   [
        
        'bid.require'              => '单车号码不能为空',
        'bid.unique'               => '单车号码已存在',
        'place.require'               => '单车位置不能为空',
        'money.require'              => '租金不能为空',
        'money.number'               => '租金必须为数字',
    ];

    // 应用场景
    protected $scene = [
        
        'edit' =>  ['bid','place','money'],
    ];
    
}
